package com.jin.spirng_boot_learn.helper;


import com.jin.spirng_boot_learn.BO.StudentBO;
import com.jin.spirng_boot_learn.domain.Student;
import org.springframework.beans.BeanUtils;

public class StudentHelper {

    public static Student convertStudent(StudentBO studentBO){
        Student student = new Student();
        BeanUtils.copyProperties(studentBO,student);
        return student;
    }

    public static StudentBO convertStudentBO(Student student){
        StudentBO studentBO = new StudentBO();
        BeanUtils.copyProperties(student,studentBO);
        return studentBO;
    }
}
